<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Configure CCL parser</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.yaz-addinfo.html">« yaz_addinfo</a></li>
      <li style="float: right;"><a href="function.yaz-ccl-parse.html">yaz_ccl_parse »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.yaz.html">YAZ 函数</a></li>
    <li>Configure CCL parser</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.yaz-ccl-conf" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">yaz_ccl_conf</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.5, PECL yaz &gt;= 0.9.0)</p><p class="refpurpose"><span class="refname">yaz_ccl_conf</span> &mdash; <span class="dc-title">Configure CCL parser</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.yaz-ccl-conf-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>yaz_ccl_conf</strong></span>(<span class="methodparam"><span class="type">resource</span> <code class="parameter">$id</code></span>, <span class="methodparam"><span class="type">array</span> <code class="parameter">$config</code></span>): <span class="type"><span class="type void">void</span></span></div>

  <p class="para rdfs-comment">
   This function configures the CCL query parser for a server with 
   definitions of access points (CCL qualifiers) and their mapping to RPN.
  </p>
  <p class="para">
   To map a specific CCL query to RPN afterwards call the 
   <span class="function"><a href="function.yaz-ccl-parse.html" class="function">yaz_ccl_parse()</a></span> function.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.yaz-ccl-conf-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">id</code></dt>

     <dd>

      <p class="para">
       The connection resource returned by <span class="function"><a href="function.yaz-connect.html" class="function">yaz_connect()</a></span>.
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">config</code></dt>

     <dd>

      <p class="para">
       An array of configuration. Each key of the array is the name of a CCL
       field and the corresponding value holds a string that specifies a 
       mapping to RPN.
      </p>
      <p class="para">
       The mapping is a sequence of attribute-type, attribute-value pairs. 
       Attribute-type and attribute-value is separated by an equal sign 
       (<code class="literal">=</code>). Each pair is separated by white space.
      </p>
      <p class="para">
       Additional information can be found on the <a href="http://www.indexdata.dk/yaz/doc/tools.tkl#CCL" class="link external">&raquo;&nbsp;CCL</a> page.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.yaz-ccl-conf-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   没有返回值。
  </p>
 </div>

 <div class="refsect1 examples" id="refsect1-function.yaz-ccl-conf-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   In the example below, the CCL parser is configured to support three CCL
   fields: <code class="literal">ti</code>, <code class="literal">au</code> and
   <code class="literal">isbn</code>. Each field is mapped to their BIB-1 equivalent.
   It is assumed that variable <code class="literal">$id</code> is the connection ID.
  </p>
  <div class="example" id="example-4584">
   <p><strong>示例 #1 CCL configuration</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$fields&nbsp;</span><span style="color: #007700">=&nbsp;array(<br />&nbsp;&nbsp;</span><span style="color: #DD0000">"ti"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"1=4"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #DD0000">"au"&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"1=1"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #DD0000">"isbn"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"1=7"<br /></span><span style="color: #007700">);<br /></span><span style="color: #0000BB">yaz_ccl_conf</span><span style="color: #007700">(</span><span style="color: #0000BB">$id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$fields</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
   </div>

  </div>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.yaz-ccl-conf-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.yaz-ccl-parse.html" class="function" rel="rdfs-seeAlso">yaz_ccl_parse()</a> - Invoke CCL Parser</span></li>
   </ul>
  </p>
 </div>

</div></div></div></body></html>